//
//  middlewares.swift
//  App
//
//  Created by melvyn on 2018/8/22.
//

import Vapor

public func middlewares(config: inout MiddlewareConfig) throws {
    config.use(FileMiddleware.self) // Serves files from `Public/` directory
    config.use(ErrorMiddleware.self) // Catches errors and converts to HTTP response
    config.use(HeadersMiddleware.self) // Add 'Cache-Control' to each response
}
